<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<title>:: SAC ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">



<link href="../css/styles.css" rel="stylesheet" type="text/css">
<script src="../script/jquery-1.7.1.min.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script type="text/javascript">
$(function()
		{
		$('#admissionNo').blur(function()
		{
		var ad = $(this).val();
		if(ad)
		{

		$.ajax({
		type: "GET",
		url: "autoComStudent.htm",
		data: {adNo: ad },
		cache: false,
		success: function(html){
		$("#autoScript").append(html);
		}
		});
		}

		return false;
		});
		});
function fill(name,branch,batch) {
$('#name').val(name);
$('#branch').val(branch);
$('#batch').val(batch);
}
</script>
<script type="text/javascript"> // ajax call for delete products 
$(function() {
$(".delbutton").click(function(){
var element = $(this);
var del_id = element.attr("id");
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deletePartialPay.htm",
data: info,
success: function(){
}
});
$(this).parents("#record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</head>

<body>
<div id="autoScript"></div>
<form action="addPartialPay.htm" method="post">
<table width="100%" border="0">
		<tr>
			<td><span class="Bredcrumbs">Stock&gt;&gt; Add Stock&gt;&gt;</span></td>
		</tr>
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="9"><img src="../images/Tright_03_01.gif" width="9"
						height="29"></td>
					<td background="../images/Tcenter.gif" class="body"><strong
						class="boxheader"> Partial Payment</strong></td>

					<td width="10"><img src="../images/Tright_1_01.gif" width="9"
						height="29"></td>
				</tr>
				<tr>
					<td height="452" valign="top" background="../images/Tright_03_03.gif"></td>
				  <td valign="top" class="news">
					<table width="100%" cellspacing="1" cellpadding="2">
						<tr bgcolor="#FFFFFF">
							<td height="20" colspan="4">
							<div align="right">
							  <div id="div"><FONT color="red"></FONT> <FONT color="green"> </FONT>
                                  <div align="right" class="mandatoryfield">*Mandatory fields </div>
						      </div>
							</div>
							<div id="errorMessage"><FONT color="red"></FONT>
							<FONT color="green">  </FONT></div>
							</td>
						</tr>

						<tr>
							<td valign="top" class="news">
							<table width="100%" border="0" align="center" cellpadding="0"
								cellspacing="0">
								<tr>
									<td><img src="../images/01.gif" width="5" height="5" /></td>
									<td width="914" background="../images/02.gif"></td>
									<td><img src="../images/03.gif" width="5" height="5" /></td>
								</tr>
								<tr>
									<td width="5" background="../images/left.gif"></td>
									<td valign="top">
									<table width="100%" cellspacing="1" cellpadding="2">

						<tr>

							<td width="13%" height="25" class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Admission No:</div>
							</td>
							<td width="33%" height="25" class="row-even"><span
								class="star">
							  <input name="admissionNo" id="admissionNo" type="text" class="row-white" value="" size="16" />
							  <input name="studentId" id="studentId" type="text" class="row-white" value="" size="16" hidden="true"  autocomplete="off"/>
							</span></td>
							<td width="15%" class="row-odd">
							<div align="right"><span class="Mandatory">*</span> Name of the Student:</div>
							</td>

							<td width="39%" class="row-even"><input name="name" id="name" type="text" class="row-white" value="" size="30" readonly="readonly"/></td>
						</tr>
						<tr>
							<td height="25" class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Branch:</div>
							</td>
							<td height="25" class="row-even"><span class="star">
							<input type="text" name="branch" id="branch"  size="16" value="" class="row-white" readonly="readonly" />
							</span></td>
							<td class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Batch:</div>
							</td> 
							<td class="row-even"><span class="star"> <input type="text" name="batch" id="batch" size="16" value=""  class="row-white" readonly="readonly"/></span></td>
						</tr>

						<tr>
							<td height="25" class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Paid Amount:</div></td>
							<td height="25" class="row-even"><input name="amount" id="amount" type="text" class="row-white" value="" size="16" /></td>
							<td class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Bill Number:</div>
							</td>
							<td class="row-even"><span class="star"> <input type="text" name="billNo" id="billNo" size="16" value="<%=request.getParameter("billNo") %>"  class="row-white" readonly="readonly"/></span></td>
						
							<td width="0%" height="25" class="row-odd">&nbsp;							</td>
						</tr>
						
						<tr>
							<td height="25" colspan="4">
							
							</td>
						</tr>

							</table>
							    </td>
									<td width="5" height="29" background="../images/right.gif"></td>
								</tr>
			
								<tr>
									<td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
									<td background="../images/05.gif"></td>
									<td><img src="../images/06.gif" /></td>
								</tr>
							</table>
							</td>
							<td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
						</tr>


						<tr>
							<td height="25" colspan="4">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="45%" height="35">
									<div align="right">
										
										
											<input type="submit" name="" value="Submit" class="formbutton">
										
									</div>
									</td>
									<td width="2%"></td>
									<td width="53%">
										
										
											<input type="button" name="" value="Reset" onClick="resetCourse()" class="formbutton">
										
									</td>
								</tr>
							</table>
							</td>
						</tr>

					<tr>
						<td valign="top" class="news">
						<table width="100%" border="0" align="center" cellpadding="0"
							cellspacing="0">
							<tr>
								<td><img src="../images/01.gif" width="5" height="5" /></td>
								<td width="914" background="../images/02.gif"></td>
								<td><img src="../images/03.gif" width="5" height="5" /></td>
							</tr>
							<tr>
								<td width="5" background="../images/left.gif"></td>
								<td valign="top">
								<table width="100%" cellspacing="1" cellpadding="2">

						<tr>
							<td height="25" colspan="4">
							<table width="100%" cellspacing="1" cellpadding="2">

								<tr>

									<td width="5%" height="25" class="row-odd" align="center">
									<div align="center">Sl.No </div>
									</td>
									<td height="25" class="row-odd" align="center" style="width: 27%">Name of Student</td>
									<td class="row-odd" align="center" style="width: 13%">Admission Number</td>
									<td width="13%" class="row-odd" align="center">
									<div align="center">Branch</div>
									</td>
									<td width="13%" class="row-odd" align="center">
									<div align="center">Batch</div>
									</td>

									<td width="15%" class="row-odd" align="center">
									<div align="center">Amount to pay</div>
									</td>

									<td class="row-odd" align="center" style="width: 5%"> 
									<div align="center">Edit</div></td>



									<td width="5%" class="row-odd" align="center">
									<div align="center">Delete</div>
									</td>
									
									
								</tr>	
								
								<c:forEach items="${items}" var="partialPay" varStatus="status">
								<tr id="record" class="<c:if test="${status.count % 2 == 0}">row-white</c:if><c:if test="${status.count % 2 == 1}">row-even</c:if>">
									
									<td  align="center" height="25">${status.count }</td>
								
									<td  align="center" style="width: 10%"><a href="../sales/searchPartialPay.htm?studentId=${partialPay.studentId.id}">${partialPay.studentId.name }</a></td>
									<td  align="center"  style="width: 10%">${partialPay.studentId.admissionNo}</td>
									<td  align="center" style="width: 15%">${partialPay.studentId.branch}</td>
									<td  align="center" style="width: 15%">${partialPay.studentId.yearOfAdmission}</td>
									<td  align="center" style="width: 15%">${partialPay.amount}</td>
									<td  align="center" style="width: 5%"><a href="updatePartialPayPage.htm?id=${partialPay.id }&from=main" id="${partialPay.id  }" class="updatebuttom"><img src="../images/edit_icon.gif"/></a></td>
									<td  align="center"  style="width: 5%"><a href="#" id="${partialPay.id }" class="delbutton"><img src="../images/delete_icon.gif"/></a></td>
										
								</tr>
							</c:forEach>
								
								

								
				
							</table>
							</td>
						</tr>

						</table>
							</td>
							<td width="5" height="29" background="../images/right.gif"></td>
						</tr>

						<tr>
							<td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
							<td background="../images/05.gif"></td>
							<td><img src="../images/06.gif" /></td>
						</tr>
					</table>
					</td>
					<td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
				</tr>


					</table>
					</td>
					<td width="10" valign="top" background="../images/Tright_3_3.gif"
						class="news"></td>
				</tr>

				<tr>
					<td valign="top" background="../images/Tright_03_03.gif"></td>
					<td height="20" valign="top"></td>
					<td width="13" valign="top" background="../images/Tright_3_3.gif"
						class="news"></td>
				</tr>
				<tr>
					<td><img src="../images/Tright_03_05.gif" width="9" height="29" /></td>
					<td width="100%" background="../images/TcenterD.gif"></td>
					<td><img src="../images/Tright_02.gif" width="9" height="29" /></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	</form>
</body>
</html>